package BoxingFight;

public class BoxingFightTest {
    public static void main(String[] args) {
        //1.创建角色
        Role r1 = new Role("乔峰",100,'男');
        Role r2 = new Role("鸠摩智",100,'男');

        //2.角色信息
        r1.showRoleInfo();
        System.out.println(" ");
        r2.showRoleInfo();
        System.out.println(" ");

        //3.开始格斗
        while (true){
            r1.attack(r2);
            if (r1.getBlood() == 0){
                System.out.println(r2.getName() + "把" + r1.getName() + "K.O了");
                break;
            }

            r2.attack(r1);
            if (r2.getBlood() == 0){
                System.out.println(r1.getName() + "把" + r2.getName() + "K.O了");
                break;
            }
        }


    }
}
